package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.pojo.Params;
import com.gxa.pojo.Params_Son;
import com.gxa.pojo.Resume;
import com.gxa.pojo.blackPojo.ShowBack;
import io.swagger.annotations.*;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping("/emp_list")
@Api(value = "录入员工回显" ,tags = "录入员工回显接口")
public class ShowBackController {
    //查询
    @RequestMapping(value = "/queryList",method = RequestMethod.GET)
    @ApiOperation(value = "录入员工下拉列表回显",notes = "",httpMethod = "GET", response = ShowBack.class)
    @ApiResponses({
            @ApiResponse(code=200,message="请求成功"),
            @ApiResponse(code=404,message="找不到页面"),
            @ApiResponse(code=500,message="后台服务错误")
    })
    @ResponseBody
    public R showBack(){
        R r=new R();
        //学历
        ShowBack showBack=new ShowBack();
        List<Params> list01=new ArrayList<>();
        Params params01=new Params();
        params01.setParam_name("初中");
        list01.add(params01);
        Params params02=new Params();
        params02.setParam_name("高中");
        list01.add(params02);
        showBack.setEducationData(list01);
        //婚姻状况
        List<Params> list02=new ArrayList<>();
        Params params03=new Params();
        params03.setParam_name("已婚");
        list02.add(params03);
        Params params04=new Params();
        params04.setParam_name("未婚");
        list02.add(params04);
        showBack.setMaritalStatusData(list02);
        //血型
        List<Params> list03=new ArrayList<>();
        Params params05=new Params();
        params05.setParam_name("A型");
        list03.add(params05);
        Params params06=new Params();
        params06.setParam_name("B型");
        list03.add(params06);
        showBack.setBloodTypeData(list03);
        //民族
        List<Params> list04=new ArrayList<>();
        Params params07=new Params();
        params07.setParam_name("汉");
        list04.add(params07);
        Params params08=new Params();
        params08.setParam_name("藏");
        list04.add(params08);
        showBack.setNationalData(list04);
        //所在部门
        List<Params> list05=new ArrayList<>();
        Params params09=new Params();
        params09.setParam_name("技术部");
        list05.add(params09);
        Params params10=new Params();
        params10.setParam_name("宣传部");
        list05.add(params10);
        showBack.setDeptData(list05);
        //职称
        List<Params> list06=new ArrayList<>();
        Params params11=new Params();
        params11.setParam_name("总监");
        list06.add(params11);
        Params params12=new Params();
        params12.setParam_name("经理");
        list06.add(params12);
        showBack.setDeptData(list06);
        //职务
        List<Params> list07=new ArrayList<>();
        Params params13=new Params();
        params13.setParam_name("总监");
        list07.add(params13);
        Params params14=new Params();
        params14.setParam_name("经理");
        list07.add(params14);
        showBack.setDeptData(list07);
        //人员类别
        List<Params> list08=new ArrayList<>();
        Params params15=new Params();
        params15.setParam_name("总监");
        list08.add(params15);
        Params params16=new Params();
        params16.setParam_name("经理");
        list08.add(params16);
        showBack.setDeptData(list08);
        //员工编号
        List<Resume> list09=new ArrayList<>();
        Resume resume01=new Resume();
        resume01.setResume_id(1499);
        list09.add(resume01);
        Resume resume02=new Resume();
        resume02.setResume_id(1500);
        list09.add(resume02);
        showBack.setResumeIdData(list09);
        r.setCode(200);
        r.setMsg("成功");
        r.setData(showBack);
        return r;
    }

}
